package org.yzh.web.response;


import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import org.yzh.web.entity.ElectronicFence;
import org.yzh.web.entity.PersonnelAlarmEntity;

import java.io.Serializable;

@Data
public class PersonnelAlarmPageSearchResponse implements Serializable {

    @TableId
    private Long id;

    /**
     * 1表示存在 0表示删除
     */
    @Schema(description = "1表示存在 0表示删除")
    private Integer isValid;
    /**
     * 报警区域名
     */
    @Schema(description = "报警名称")
    private String domainName;
    /**
     * 围栏名称
     */
    @Schema(description = "围栏名称")
    private String fenceName;
    /**
     * 报警部门
     */
    @Schema(description = "报警部门")
    private String alarmDepartment;
    /**
     * 例外人员
     */
    @Schema(description = "例外人员")
    private Integer exceptionalPersonnel;
    /**
     * 报警类型
     */
    @Schema(description = "报警类型")
    private String alarmType;
    /**
     * 序号
     */
    @Schema(description = " 序号")
    private Integer serialNumber;
    /**
     * 生效日期
     */
    @Schema(description = "生效日期")
    private String effectiveDate;
    /**
     * 生效时间
     */
    @Schema(description = "生效时间")
    private String effectiveTime;
    /**
     * 报警规则
     */
    @Schema(description = "报警规则")
    private String alarmRule;

    public static PersonnelAlarmPageSearchResponse convert(PersonnelAlarmEntity detail) {
        PersonnelAlarmPageSearchResponse response = new PersonnelAlarmPageSearchResponse();
        BeanUtils.copyProperties(detail,response);
        return response;
    }
}
